home *** CD-ROM | disk | FTP | other *** search
- LASTFEW.420 (Colors your last few callers) New Version
- Rambo #1 @8856
- Wed Dec 04 01:37:22 1991
- LASTFEW.420
-
- Last Few Callers Mod for V4.20
-
- Original author: Doc #1 @4350
- The BoardWalker BBS
- (413) 549-4133
- Amherst, Massachusetts
- August 6, 1989
-
-
- Modified for WWIV V4.20
- By: Rambo #1 @8856
- Rambo-Scan BBS
- (818) 566-7912
- Burbank, California
- December 3rd 1991
-
-
- NOTE: This MOD has been changed to work for only WWIV 4.20, and if you would
- like to use this on an earlier version, you will have to look around for
- the original MOD (LASTFEW.MOD). I may have the original source sitting
- around, but I really suggest that you upgrad to WWIV 4.20.
-
-
- ===========================> What Does It Do? <============================
-
-
- Adding this modification to your WWIV source code will format your
- "Last Few Callers" listing (and your Log of the Day file) so it doesn't
- appear so jumbled. The modification prints the call number, user name and
- number, time of call (in standard time - not military time), date, baud
- rate, and number of times on today in justified columns, and in color. A
- sample of the output is shown below:
-
-
- 559964: Eno #20 211:31 pm 308/05/89 72400 - 1
- 559974: Marty Karlin #132 212:20 am 308/06/89 72400 - 1
- 559984: Pat Buttons #4 212:28 am 308/06/89 71200 - 1
- 559994: Pat Buttons #4 21:16 am 308/06/89 71200 - 2
- 560004: Benny Hill #8 21:37 am 308/06/89 72400 - 1
- 560014: Rambo #1 23:40 am 308/06/89 79600 - 1
- 560024: Jim Connor #35 23:52 am 308/06/89 72400 - 1
-
-
- ========================> How Long will it take? <========================
-
- If you are using a program such as Q-Edit, you can cut and paste
- this MOD in about 5 minutes or less depending on your ability.
-
- ==========================================================================
-
- As it is written, the colors are set as follows (the WWIV numbers in
- parenthesis refer to the default colors of WWIV, as set in D:efaults from
- the Main Menu. If you've modified these settings, the colors of the list
- will change accordingly). Please feel free to change them to what ever
- you would like, but the way I have it set up looks real nice, give it a
- try first.
-
-
- Call number: Green (WWIV color 5)
- User name: White on Blue (WWIV color 4)
- Time: High Intensity Yellow (WWIV color 2)
- Date: High Intensity Magenta (WWIV color 3)
- Baud rate
- & times on: High Intensity Blue (WWIV color 7)
-
-
- ==========================> How Do I Install It? <========================
-
- _________________________________ Step 1 _________________________________
-
-
- Add the following prototypes to the end of FCNS.H, then save the file:
-
- char *get_time(char *hhmm);
- char *copy(char *sstring, int position, int numchars, char *dstring);
- void insert(char *obstr, char *trgstr, int position);
-
-
- _________________________________ Step 2 _________________________________
-
-
- Add the following #include statements to LILO.C:
-
- #include <math.h>
- #include <dos.h>
-
- _________________________________ Step 3 _________________________________
-
-
- While still in LILO.C, search for void logon(), and change the variable
- declaration from:
-
- /* Old Code */
- void logon()
- {
- char s[255],s1[81],s2[81],*ss; /* This is the line you change */
- int i,i1,f;
- long len,pos;
- /* Old Code */
-
- to read:
-
- char s[255],s1[81],s2[81],s3[81],s4[81],hhmm[10],*ss;
-
- _________________________________ Step 4 _________________________________
-
-
- Scroll down a bit, looking for the following segment of code:
-
- if ((actsl!=255) || (incom)) {
- sl1(0,"");
- sl1(0,s);
- sl1(1,"");
-
- Replace the section under sl1(1,"") with the following code:
-
- sl1(1,""); /* existing line */
-
- /* Begin Modified Code */
-
- sprintf(s,"\003%c",'5');
- ltoa(status.callernum1,s3,10);
- strcat(s,s3);
- strcat(s,": ");
- strcpy(s3,s4);
- sprintf(s3,"\003%c%-25s",'4',nam(&thisuser,usernum));
- strcat(s,s3);
- strcpy(s3,s4);
- sprintf(s3,"\003%c%-8s ",'2',get_time(hhmm));
- strcat(s,s3);
- strcpy(s3,s4);
- sprintf(s3,"\003%c%s ",'3',date());
- strcat(s,s3);
- strcpy(s3,s4);
- sprintf(s3,"\003%c%s - %d",'7',curspeed,thisuser.ontoday);
- strcat(s,s3);
- strcpy(s3,s4);
-
- /* End Modified Code */
-
- sprintf(s1,"%sUSER.LOG",syscfg.gfilesdir); /* existing line */
-
- _________________________________ NOTES _________________________________
-
- 1. There is a segment of code that is very similar to the one you are
- replacing just above the correct segment. Be sure you are replacing the
- correct series of strcat lines; the set you want is *below* the line that
- reads "pl("Last few callers: ")".
-
- 2. The colors and formatting of the list are specified in the above code
- segment. As it is written, the code allows 25 spaces for the caller's name
- (%-25s), filling the unused space with blanks. The colors are specified in
- the sprintf lines; they are the numbers surrounded by single quotes (e.g.
- '5'), and correspond to the default WWIV colors.
-
- _________________________________ Step 5 _________________________________
-
-
- Go to the end of LILO.C, and add the following functions, then save the
- file:
-
-
- char *get_time(char *hhmm)
- {
- char tstr[10], tstr1[10];
- struct time timeblk;
-
- gettime(&timeblk);
- sprintf(hhmm, "%02d%02d", timeblk.ti_hour, timeblk.ti_min);
- insert(":", hhmm, 3);
- if (strcmp(copy(hhmm, 1, 2, tstr), "12") > 0)
- sprintf(hhmm, "%d%s pm", atoi(copy(hhmm, 1, 2, tstr)) - 12,
- copy(hhmm, 3, 3, tstr1));
- else
- {
- if (strcmp(copy(hhmm, 1, 2, tstr), "01") < 0)
- sprintf(hhmm, "12%s am", copy(hhmm, 3, 3, tstr));
- else
- {
- if (strcmp(copy(hhmm, 1, 2, tstr), "10") < 0)
- sprintf(hhmm, "%s am", copy(hhmm, 2, 4, tstr));
- else
- sprintf(hhmm, "%s am", copy(hhmm, 1, 5, tstr));
- }
- }
- return (hhmm);
- }
-
- char *copy(char *sstring, int position, int numchars, char *dstring)
- {
- int c;
-
- if (position <= strlen(sstring))
- {
- for (c = 0, position--, numchars--; ((sstring[position]) && (c <=
- numchars));
- position++, c++)
- dstring[c] = sstring[position];
- dstring[c] = 0;
- } else
- dstring[0] = 0;
-
- return (dstring);
- }
-
- void insert(char *obstr, char *trgstr, int position)
- {
- int oblen, trglen;
-
- position--;
- trglen = strlen(trgstr);
- if (position <= trglen)
- {
- oblen = strlen(obstr);
- movmem(trgstr + position, trgstr + oblen + position,
- trglen - position + 1);
- movmem(obstr, trgstr + position, oblen);
- } else
- strcat(trgstr, obstr);
- }
- _________________________________ Step 6 _________________________________
-
-
- Recompile the whole BBS (press F9 while in the Turbo C environment) or type
- MAKE from the DOS prompt, and you're done. You've modified FCNS.H, so a
- complete recompilation is necessary.
-
-
- ________________________________ Comments ________________________________
-
- No warranty, guarantee or liability for the use of this code is
- implied, expressed, or assumed by the author. Implementation of this code
- is strictly a voluntary decision on your part, and its use implies full
- consent and agreement by you with the above conditions. This code
- contained in this file is released to the public domain, and may be
- modified to suit particular needs. The WWIV source code and program is
- Copyright (c) 1988 by Wayne Bell.
-
- My thanks to Pete Runyan (#1 @4351) for beta testing the code and its
- implementation instructions. Special thanks to Wayne Bell for creating
- WWIV, for his continuing efforts at improving an already great BBS program,
- and for releasing the source code to registered users.
-
- If you have any problems, questions, or comments, you may contact me at the
- BoardWalker BBS as #1@4350, or call at (413) 549-4133.
-
- _____________________________ Final Comments _____________________________
-
- (From Rambo)
-
- Thanks to all that made this MOD possible, I didn't change a whole
- lot from the oritinal MOD. If you computer explodes, don't blame me,
- I didn't do it. I have this MOD running on my BBS, and I just re-tested it
- on Virgin Source Code and it just compiled without any errors.
- If you have any problems, please feel free to contact me.
-
- Rambo #1 @8856 (818) 566-7912 3/12/24/9600 Buad Compucom SpeedModem Combo.
- Home of the largest Anti-Virus Transfer Section in the United States.